package book;

import java.util.Arrays;

public class BookList {
    private Book[] books = new Book[10];
    private int usedSize;//记录书的个数



    //事先通过构造方法，初始化预存三本书
    public BookList() {
    books[0]=new Book("刀剑神域","xxx",30,"轻小说");
    books[1]=new Book("Re:从零开始的异世界生活","xxx",50,"轻小说");
    books[2]=new Book("邻家天使","xxx",55,"轻小说");
    this.usedSize=3;
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }
    public Book getPos(int pos){
        return books[pos];
    }

    public void setBooks(Book book,int pos){
        books[pos]=book;
    }
}
